package com.xuecheng.manage_course.controller;

import com.xuecheng.api.course.CategoryControllerApi;
import com.xuecheng.framework.domain.course.ext.CategoryNode;
import com.xuecheng.manage_course.service.CategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ShengJinFeng
 * @version V1.0
 * @ClassName CategoryController
 * @Description (这里用一句话描述这个类的作用)
 * @date 2020/2/3 14:04
 * @since V1.0
 */
@RestController
@Api(value="分类管理接口",description = "分类管理接口，提供分类的增，删，改，查")
@RequestMapping("/category")
public class CategoryController implements CategoryControllerApi {

    @Autowired
    private CategoryService categoryService;

    @Override
    @ApiOperation("查询分类")
    @GetMapping("list")
    public CategoryNode findCategoryList() {
        return categoryService.findCategoryList();
    }
}
